#pragma once

#include <fstream>
#include <sstream>
#include <iostream>
#include <string>

namespace tmms
{
    namespace base 
    {
        class Logger {
            public :
                Logger();
                Logger(const Logger&) = delete;
                ~Logger() = default;

                Logger(std::string logFilePath, std::string logFileName);


                void LogStart(std::string context);
                void LogEnd(std::string context);
                bool OpenFile(std::string absolutePath);
                bool CloseFile();

                void Debug(std::string context);
                void Error(std::string context);
                void Warning(std::string context);
                void Info(std::string context);

            public:
                static std::string m_logFilePath; // 静态变量的初始化只能放在类外
                static std::string m_title;
            private:
                std::ofstream _file;
                std::string absPath;   
        };

    }
  
}